import request from '@/utils/request'
// import qs from 'qs' // qs(queryString库可以用来格式化传参，根据服务端接口选用该库)

export function loginByUsername(username, password, rememberMe) {
  const data = {
    username,
    password,
    loginType: 'USERNAME',
    rememberMe
  }
  return request({
    url: '/web/account/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/web/account/logout',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/web/user/info',
    method: 'get',
    params: { token }
  })
}

